#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <stdlib.h>
int main()
{
  pid_t id = fork();

  if(id == 0)
  {
    while(1)
    {
      printf("I am child process%d\n ",id);
      sleep(1);
    }
    printf("I am over\n");
    exit(1);
  }
  int status = 0;
  printf("I am father process\n");
  int ret = wait(&status);

  printf("%d\n",ret);
  return 0;
}
